.customer-chat-page {
  min-height: 100vh;
  background-color: #f5f5f5;
  position: relative;
}

/* 聊天容器 */
.chat-container {
  max-width: 1200px;
  margin: 20px auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  height: 80vh;
}

/* 聊天头部 */
.chat-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
}

.chat-icon {
  font-size: 20px;
}

.chat-controls {
  display: flex;
  gap: 5px;
}

.control-btn {
  background: none;
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.2s ease;
}

.control-btn:hover {
  background: rgba(255,255,255,0.2);
}

/* 聊天内容区域 */
.chat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 50px;
  height: calc(100% - 50px);
}

/* 消息区域 */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8f9fa;
}

.message {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.message.system {
  align-items: center;
}

.message.user {
  align-items: flex-end;
}

.message.bot {
  align-items: flex-start;
}

.message-time {
  font-size: 12px;
  color: #999;
  margin-bottom: 5px;
}

.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.message.system .message-bubble {
  background: #e3f2fd;
  color: #1976d2;
  border: 1px solid #bbdefb;
}

.message.user .message-bubble {
  background: #667eea;
  color: white;
  border-radius: 18px 18px 4px 18px;
}

.message.bot .message-bubble {
  background: white;
  color: #333;
  border: 1px solid #e0e0e0;
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 输入区域 */
.chat-input-area {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  background: white;
}

.input-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.tool-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.tool-btn:hover {
  background: #f0f0f0;
}

.input-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}

.message-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}

.message-input:focus {
  border-color: #667eea;
}

.send-btn {
  padding: 12px 24px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.send-btn:hover {
  background: #5a6fd8;
}

/* 侧边栏 */
.chat-sidebar {
  width: 300px;
  background: #f8f9fa;
  border-left: 1px solid #e0e0e0;
  padding: 20px;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-item {
  background: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.faq-question {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.faq-answer {
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

/* 返回顶部按钮 */
.fhdb {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #667eea;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

.fhdb:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.fhdb img {
  width: 20px;
  height: 20px;
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar,
.chat-sidebar::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.chat-sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb,
.chat-sidebar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.chat-sidebar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .chat-container {
    margin: 10px;
    height: 90vh;
    flex-direction: column;
  }
  
  .chat-sidebar {
    width: 100%;
    height: 200px;
    border-left: none;
    border-top: 1px solid #e0e0e0;
  }
  
  .message-bubble {
    max-width: 85%;
  }
  
  .input-wrapper {
    flex-direction: column;
    gap: 10px;
  }
  
  .send-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .chat-header {
    padding: 0 15px;
  }
  
  .chat-title {
    font-size: 14px;
  }
  
  .control-btn {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }
  
  .message-bubble {
    max-width: 90%;
    font-size: 13px;
  }
  
  .faq-item {
    padding: 12px;
  }
  
  .faq-question {
    font-size: 13px;
  }
  
  .faq-answer {
    font-size: 12px;
  }
} 